"""
购物完成方法
"""
from common.base import Base, get_driver
from selenium.webdriver.common.by import By


class Finish(Base):
    # 点击用户中心
    def click_user(self):
        self.click((By.LINK_TEXT, "用户中心"))


if __name__ == '__main__':
    # 创建浏览器驱动
    driver = get_driver()
    finish = Finish(driver)
    # 访问目标网址
    finish.get('http://localhost:8080/ecshop/flow.php?step=done')
    finish.click_user()
    finish.quit(2)
